import Vue from 'vue'
import Router from 'vue-router'
import Login from '../pages/Login.vue'
import Home from '../pages/Home.vue'
import AdvertiseManage from '../pages/AdvertiseManage.vue'
import AgentManage from '../pages/AgentManage.vue'
import OrderManage from '../pages/OrderManage.vue'
import RechargeRecord from '../pages/RechargeRecord.vue'
import UserManage from '../pages/UserManage.vue'
import WashHouse from '../pages/WashHouse.vue'
import WashMachine from '../pages/WashMachine.vue'
import WithdrawManage from '../pages/WithdrawManage.vue'
import Index from '../pages/index.vue'
import SafetyManage from '../pages/SafetyManage.vue'
Vue.use(Router)

export default new Router({
  mode: 'history',
  routes: [
    {
      path: '/',
      name: '登录',
      component: Login
    },
    {
      path: '/home',
      name: '主页',
      component: Home,
      children: [
        {
          path: 'Index',
          name: 'Index',
          component: Index
        },
        {
          path: 'AdvertiseManage',
          name: 'AdvertiseManage',
          component: AdvertiseManage
        },
        {
          path: 'AgentManage',
          name: 'AgentManage',
          component: AgentManage
        },
        {
          path: 'OrderManage',
          name: 'OrderManage',
          component: OrderManage
        },
        {
          path: 'RechargeRecord',
          name: 'RechargeRecord',
          component: RechargeRecord
        },
        {
          path: 'UserManage',
          name: 'UserManage',
          component: UserManage
        },
        {
          path: 'SafetyManage',
          name: 'SafetyManage',
          component: SafetyManage
        },
        {
          path: 'WashHouse',
          name: 'WashHouse',
          component: WashHouse,
          children: [
            {
              path: 'WashMachine',
              name: 'WashMachine',
              component: WashMachine
            },
          ]
        },
        {
          path: 'WithdrawManage',
          name: 'WithdrawManage',
          component: WithdrawManage
        },
      ]
    }

  ]
})
